package com.poisonh.unifiedauth.dialog;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.hp.hpl.sparta.Text;
import com.poisonh.unifiedauth.R;

import net.karthikraj.shapesimage.ShapesImage;

/**
 * Created by wish30_4 on 2017/5/5.
 */

public class MerchantsDialogFragment extends BaseDialogFragment{
    private ShapesImage iv_merchants_img;//图片
    private Button btn_determine; //确定按钮
    private String msg;
    private TextView tv_tips;
    @Override
    protected View loadView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        msg = getArguments().getString("msg");
        return inflater.inflate(R.layout.layout_dialog_merchants, null);
    }


    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        btn_determine = (Button) view.findViewById(R.id.btn_determine);
        iv_merchants_img = (ShapesImage) view.findViewById(R.id.iv_merchants_img);
        tv_tips= (TextView) view.findViewById(R.id.tv_tips);
        if(msg!=null){
            tv_tips.setText(msg);
        }
        Glide.with(this).load(R.mipmap.pakistan_gun).into(iv_merchants_img);
        btn_determine.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }
}
